package Test.JStruts2Test.web;

import org.springframework.beans.factory.annotation.Autowired;

import Test.JStruts2Test.service.TestService;

import com.core.framework.web.easyweb.EasyAction;
import com.core.framework.web.easyweb.annotation.MethodType;
import com.core.framework.web.easyweb.annotation.Namespace;
@Namespace("/abc")
public class TestAction extends EasyAction {
	
	@Autowired
	TestService testService;
	private static final long serialVersionUID = 1L;
	public String toIndex()
	{
		String a = this.request.getParameter("a");
		System.out.println(a);
		System.out.println(testService.test());
		return "/index.jsp";
	}
	@MethodType(MethodType.FORWARD)
	public String toIndex2()
	{
		String a = this.request.getParameter("a");
		request.setAttribute("abc", "abc");
		System.out.println(a);
		System.out.println(testService.test());
		return "/index.jsp";
	}
	@MethodType(MethodType.REDIRECT)
	public String toIndex3()
	{
		String a = this.request.getParameter("a");
		System.out.println("toIndex3.........."+a);
		System.out.println(testService.test());
		return "/index.jsp";
	}
	public void toIndex4()
	{
		String a = this.request.getParameter("a");
		System.out.println("toIndex4..........."+a);
		System.out.println(testService.test());
	}
	@MethodType(MethodType.JSON)
	public void toIndex5()
	{
		String a = this.request.getParameter("a");
		System.out.println("toIndex4..........."+a);
		System.out.println(testService.test());
	}
	

}
